inst_id_to_names = {
    # piano:
    0: ['acoustic grand piano', 'piano'],
    1: ['bright acoustic piano', 'piano'],
    2: ['electric grand piano', 'electric piano'],
    3: ['honky-tonk piano', 'honky-tonk piano'],
    4: ['electric piano 1', 'electric piano'],
    5: ['electric piano 2', 'electric piano'],
    6: ['harpsichord', 'harpsichord'],
    7: ['clavinet', 'clavinet'],
    # chromatic percussion:
    8: ['celesta', 'celesta'],
    9: ['glockenspiel', 'glockenspiel'],
    10: ['music box', 'music box'],
    11: ['vibraphone', 'vibraphone'],
    12: ['marimba', 'marimba'],
    13: ['xylophone', 'xylophone'],
    14: ['tubular bells', 'tubular bells'],
    15: ['dulcimer', 'dulcimer'],
    # organ:
    16: ['drawbar organ', 'drawbar organ'],
    17: ['percussive organ', 'percussive organ'],
    18: ['rock organ', 'rock organ'],
    19: ['church organ', 'church organ'],
    20: ['reed organ', 'reed organ'],
    21: ['accordion', 'accordion'],
    22: ['harmonica', 'harmonica'],
    23: ['tango accordion', 'tango accordion'],
    # guitar:
    24: ['acoustic guitar (nylon)', 'guitar'],
    25: ['acoustic guitar (steel)', 'guitar'],
    26: ['electric guitar (jazz)', 'electric guitar'],
    27: ['electric guitar (clean)', 'electric guitar'],
    28: ['electric guitar (muted)', 'electric guitar'],
    29: ['overdriven guitar', 'electric guitar'],
    30: ['distortion guitar', 'electric guitar'],
    31: ['guitar harmonics', 'electric guitar'],
    # bass:
    32: ['acoustic bass', 'bass'],
    33: ['electric bass (finger)', 'electric bass'],
    34: ['electric bass (pick)', 'electric bass'],
    35: ['fretless bass', 'fretless bass'],
    36: ['slap bass 1', 'slap bass'],
    37: ['slap bass 2', 'slap bass'],
    38: ['synth bass 1', 'synth bass'],
    39: ['synth bass 2', 'synth bass'],
    # strings:
    40: ['violin', 'violin'],
    41: ['viola', 'viola'],
    42: ['cello', 'cello'],
    43: ['contrabass', 'contrabass'],
    44: ['tremolo strings', 'tremolo strings'],
    45: ['pizzicato strings', 'pizzicato strings'],
    46: ['orchestral harp', 'orchestral harp'],
    47: ['timpani', 'timpani'],
    # strings (continued):
    48: ['string ensemble 1', 'string ensemble'],
    49: ['string ensemble 2', 'string ensemble'],
    50: ['synth strings 1', 'synth strings'],
    51: ['synth strings 2', 'synth strings'],
    52: ['choir aahs', 'choir singing'],
    53: ['voice oohs', 'singing voice'],
    54: ['synth voice', 'synth voice'],
    55: ['orchestra hit', 'orchestra hit'],
    # brass:
    56: ['trumpet', 'trumpet'],
    57: ['trombone', 'trombone'],
    58: ['tuba', 'tuba'],
    59: ['muted trumpet', 'muted trumpet'],
    60: ['french horn', 'french horn'],
    61: ['brass section', 'brass section'],
    62: ['synth brass 1', 'synth brass'],
    63: ['synth brass 2', 'synth brass'],
    # reed:
    64: ['soprano sax', 'soprano sax'],
    65: ['alto sax', 'alto sax'],
    66: ['tenor sax', 'tenor sax'],
    67: ['baritone sax', 'baritone sax'],
    68: ['oboe', 'oboe'],
    69: ['english horn', 'english horn'],
    70: ['bassoon', 'bassoon'],
    # pipe:
    71: ['clarinet', 'clarinet'],
    72: ['piccolo', 'piccolo'],
    73: ['flute', 'flute'],
    74: ['recorder', 'recorder'],
    75: ['pan flute', 'pan flute'],
    76: ['blown bottle', 'blown bottle'],
    77: ['shakuhachi', 'shakuhachi'],
    78: ['whistle', 'whistle'],
    79: ['ocarina', 'ocarina'],
    # synth lead:
    80: ['lead 1 (square)', 'synth lead'],
    81: ['lead 2 (sawtooth)', 'synth lead'],
    82: ['lead 3 (calliope)', 'synth lead'],
    83: ['lead 4 (chiff)', 'synth lead'],
    84: ['lead 5 (charang)', 'synth lead'],
    85: ['lead 6 (voice)', 'synth lead'],
    86: ['lead 7 (fifths)', 'synth lead'],
    87: ['lead 8 (bass + lead)', 'synth lead'],
    # synth pad:
    88: ['pad 1 (new age)', 'synth pad'],
    89: ['pad 2 (warm)', 'synth pad'],
    90: ['pad 3 (polysynth)', 'synth pad'],
    91: ['pad 4 (choir)', 'synth pad'],
    92: ['pad 5 (bowed)', 'synth pad'],
    93: ['pad 6 (metallic)', 'synth pad'],
    94: ['pad 7 (halo)', 'synth pad'],
    95: ['pad 8 (sweep)', 'synth pad'],
    # synth effects:
    96: ['fx 1 (rain)', 'rain sound'],
    97: ['fx 2 (soundtrack)', 'soundtrack'],
    98: ['fx 3 (crystal)', 'crystal'],
    99: ['fx 4 (atmosphere)', 'atmosphere'],
    100: ['fx 5 (brightness)', 'brightness'],
    101: ['fx 6 (goblins)', 'goblins'],
    102: ['fx 7 (echoes)', 'echoes'],
    103: ['fx 8 (sci-fi)', 'sci-fi'],
    # ethnic:
    104: ['sitar', 'sitar'],
    105: ['banjo', 'banjo'],
    106: ['shamisen', 'shamisen'],
    107: ['koto', 'koto'],
    108: ['kalimba', 'kalimba'],
    109: ['bag pipe', 'bag pipe'],
    110: ['fiddle', 'fiddle'],
    111: ['shanai', 'shanai'],
    # percussive:
    112: ['tinkle bell', 'tinkle bell'],
    113: ['agogo', 'agogo'],
    114: ['steel drums', 'steel drums'],
    115: ['woodblock', 'woodblock'],
    116: ['taiko drum', 'taiko drum'],
    117: ['melodic tom', 'melodic tom'],
    118: ['synth drum', 'synth drum'],
    119: ['reverse cymbal', 'reverse cymbal'],
    # sound effects:
    120: ['guitar fret noise', 'guitar fret noise'],
    121: ['breath noise', 'breath noise'],
    122: ['seashore', 'seashore'],
    123: ['bird tweet', 'bird tweet'],
    124: ['telephone ring', 'telephone ring'],
    125: ['helicopter', 'helicopter'],
    126: ['applause', 'applause'],
    127: ['gunshot', 'gunshot'],
    # drum:
    128: ['drum', 'drum'],
}

inst_id_to_inst_class_id = {
    # piano:
    0: 0,
    1: 0,
    2: 0,
    3: 0,
    4: 0,
    5: 0,
    6: 0,
    7: 0,
    # chromatic percussion:
    8: 1,
    9: 1,
    10: 1,
    11: 1,
    12: 1,
    13: 1,
    14: 1,
    15: 1,
    # organ:
    16: 2,
    17: 2,
    18: 2,
    19: 2,
    20: 2,
    21: 2,
    22: 2,
    23: 2,
    # guitar:
    24: 3,
    25: 3,
    26: 3,
    27: 3,
    28: 3,
    29: 3,
    30: 3,
    31: 3,
    # bass:
    32: 4,
    33: 4,
    34: 4,
    35: 4,
    36: 4,
    37: 4,
    38: 4,
    39: 4,
    # strings:
    40: 5,
    41: 5,
    42: 5,
    43: 5,
    44: 5,
    45: 5,
    46: 5,
    47: 5,
    # strings (continued):
    48: 6,
    49: 6,
    50: 6,
    51: 6,
    52: 6,
    53: 6,
    54: 6,
    55: 6,
    # brass:
    56: 7,
    57: 7,
    58: 7,
    59: 7,
    60: 7,
    61: 7,
    62: 7,
    63: 7,
    # reed:
    64: 8,
    65: 8,
    66: 8,
    67: 8,
    68: 8,
    69: 8,
    70: 8,
    71: 8,
    # pipe
    72: 9,
    73: 9,
    74: 9,
    75: 9,
    76: 9,
    77: 9,
    78: 9,
    79: 9,
    # synth lead:
    80: 10,
    81: 10,
    82: 10,
    83: 10,
    84: 10,
    85: 10,
    86: 10,
    87: 10,
    # synth pad:
    88: 11,
    89: 11,
    90: 11,
    91: 11,
    92: 11,
    93: 11,
    94: 11,
    95: 11,
    # synth effects:
    96: 12,
    97: 12,
    98: 12,
    99: 12,
    100: 12,
    101: 12,
    102: 12,
    103: 12,
    # ethnic:
    104: 13,
    105: 13,
    106: 13,
    107: 13,
    108: 13,
    109: 13,
    110: 13,
    111: 13,
    # percussive:
    112: 14,
    113: 14,
    114: 14,
    115: 14,
    116: 14,
    117: 14,
    118: 14,
    119: 14,
    # sound effects:
    120: 15,
    121: 15,
    122: 15,
    123: 15,
    124: 15,
    125: 15,
    126: 15,
    127: 15,
    # drum:
    128: 16,
}


inst_id_to_inst_class_id_2 = {
    # piano:
    0: 0,
    1: 0,
    2: 0,
    3: 0,
    4: 0,
    5: 0,
    6: 0,
    7: 0,
    # pitched percussion:
    8: 1,
    9: 1,
    10: 1,
    11: 1,
    12: 1,
    13: 1,
    14: 1,
    15: 1,
    # organ:
    16: 2,
    17: 2,
    18: 2,
    19: 2,
    20: 2,
    21: 2,
    22: 2,
    23: 2,
    # guitar:
    24: 3,
    25: 3,
    26: 3,
    27: 3,
    28: 3,
    29: 3,
    30: 3,
    31: 3,
    # bass:
    32: 4,
    33: 4,
    34: 4,
    35: 4,
    36: 4,
    37: 4,
    38: 4,
    39: 4,
    # strings:
    40: 5,
    41: 5,
    42: 5,
    43: 5,
    44: 5,
    45: 5,
    46: 5,
    47: 5,
    # strings (continued):
    48: 6,
    49: 6,
    50: 6,
    51: 6,
    52: 6,
    53: 6,
    54: 6,
    55: 6,
    # brass:
    56: 7,
    57: 7,
    58: 7,
    59: 7,
    60: 7,
    61: 7,
    62: 7,
    63: 7,
    # reed:
    64: 8,
    65: 8,
    66: 8,
    67: 8,
    68: 8,
    69: 8,
    70: 8,
    71: 8,
    # pipe
    72: 9,
    73: 9,
    74: 9,
    75: 9,
    76: 9,
    77: 9,
    78: 9,
    79: 9,
    # synth lead:
    80: 10,
    81: 10,
    82: 10,
    83: 10,
    84: 10,
    85: 10,
    86: 10,
    87: 10,
    # synth pad:
    88: 10,
    89: 10,
    90: 10,
    91: 10,
    92: 10,
    93: 10,
    94: 10,
    95: 10,
    # synth effects:
    96: 10,
    97: 10,
    98: 10,
    99: 10,
    100: 10,
    101: 10,
    102: 10,
    103: 10,
    # ethnic:
    104: 11,
    105: 11,
    106: 11,
    107: 11,
    108: 11,
    109: 11,
    110: 11,
    111: 11,
    # pitched percussion:
    112: 1,
    113: 1,
    114: 1,
    115: 1,
    116: 1,
    117: 1,
    118: 1,
    119: 1,
    # sound effects:
    120: 12,
    121: 12,
    122: 12,
    123: 12,
    124: 12,
    125: 12,
    126: 12,
    127: 12,
    # drum:
    128: 13,
}


inst_class_id_to_name = {
    0: 'piano',
    1: 'chromatic percussion',
    2: 'organ',
    3: 'guitar',
    4: 'bass',
    5: 'strings',
    6: 'ensemble',
    7: 'brass',
    8: 'reed',
    9: 'pipe',
    10: 'synth lead',
    11: 'synth pad',
    12: 'synth effects',
    13: 'ethnic instrument',
    14: 'purcussion',
    15: 'sound effects',
    16: 'drum'
}


inst_class_id_to_name_2 = {
    0: 'piano',
    1: 'pitched percussion',
    2: 'organ',
    3: 'guitar',
    4: 'bass',
    5: 'strings',
    6: 'ensemble',
    7: 'brass',
    8: 'reed',
    9: 'pipe',
    10: 'synthesizer',
    11: 'ethnic instrument',
    12: 'sound effect',
    13: 'drum'
}


ordinal_digit_numbers = ['1st', '2nd', '3rt', '4th', '5th', '6th', '7th', '8th', '9th', '10th', '11th', '12th', '13th', '14th', '15th', '16th']
ordinal_letter_numbers = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eighth', 'ninth', 'tenth', 'eleventh', 'twelfth', 'thirteenth', 'fourteenth', 'fifteenth', 'sixteenth']
